<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
<h:head>
    <title>#{msg.title_registration}</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
    <link rel="stylesheet" href="/resources/css/style.css" type="text/css"/>
    <f:view locale="#{userBean.locale}"/>


</h:head>
<h:body>

    <h:form>
        <div class="center">
            <h:form>
                <div style="text-align:right;">



                </div>
                <div class="text">Регистрация :</div>
                логин -> <h:inputText value="#{regUser.login}" id="login"
                    label="Логин занят!"
                    validator="#{regUser.checkLogin}"
                    />
                <h:message for="login"/>
                <br/>
                Пароль ->  <h:inputText value="#{regUser.pass}" id="pass" /> <br/>
                @mail ->  <h:inputText value="#{regUser.email}" id="email"
                                       label="Неверный @mail адрес" validator="#{regUser.validateEmail}"
                    />
                <h:message for="email"/>
                <h:commandButton value="Отправить код" action="#{regUser.sendCode}"/>

                <h:panelGroup rendered="#{regUser.sent}">
                    <br/> Введите проверочный код :
                    <h:inputText  label="Неверный проверочный код"
                                  id="code" value="#{regUser.codeUser}"
                                  validator="#{regUser.verificationСode}" />
                    <h:message for="code"/>

                    <h:commandButton value="Зарегистрироваться" action="#{regUser.registration}"/>
                </h:panelGroup>
            </h:form>

            <h:commandLink value="Авторизация" action="authorization"/>
            <h:commandButton value="Главная" action="/index"/>
        </div>

    </h:form>


</h:body>


</html>



